#ifndef __LOCK_MUTEX_H__
#define __LOCK_MUTEX_H__

#include <pthread.h>

class Lock {
public:
	Lock(pthread_mutex_t *mutex) {
		mutex_ = mutex;
		pthread_mutex_lock(mutex_);
	}
	~Lock() {
		pthread_mutex_unlock(mutex_);
	}
private:
	pthread_mutex_t *mutex_;
};

#endif
